import request from '@/utils/request'
export default {
  getCourseList(page, limit, searchObj) {
    return request({
      url: `/eduService/frontCourse/${page}/${limit}`,
      method: 'post',
      data: searchObj
    })
  },
  // 获取课程二级分类
  getAllSubject() {
    return request({
      url: `/eduService/edu-subject/getAllSubject`,
      method: 'get'
    })
  },
  // 课程详情页
  getCourseInfo(id) {
    return request({
      url: `/eduService/frontCourse/getFrontCourseInfo/${id}`,
      method: 'get'
    })
  },
  //判断是否购买
  isBuyCourse(memberId,id) {
    return request({
      url: `/orderService/order/isBuyCourse/${memberId}/${id}`,
      method: 'get'
    })
  }
}
